package com.education.welco.service.impl;


import com.education.common.utils.Convert;
import com.education.welco.mapper.TTeafollowMapper;
import com.education.welco.pojo.TTeafollow;
import com.education.welco.service.ITTeafollowService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 关注教师 服务层实现
 *
 * @author d
 * @date 2020-05-08
 */
@Service
public class TTeafollowServiceImpl implements ITTeafollowService {

    @Autowired
    private TTeafollowMapper tTeafollowMapper;

    /**
     * 查询关注教师信息
     *
     * @param id 关注教师ID
     * @return 关注教师信息
     */
    @Override
    public TTeafollow selectTTeafollowById(Integer id) {
        return tTeafollowMapper.selectTTeafollowById(id);
    }

    /**
     * 查询关注教师列表
     *
     * @param tTeafollow 关注教师信息
     * @return 关注教师集合
     */
    @Override
    public List<TTeafollow> selectTTeafollowList(TTeafollow tTeafollow) {
        return tTeafollowMapper.selectTTeafollowList(tTeafollow);
    }

    /**
     * 新增关注教师
     *
     * @param tTeafollow 关注教师信息
     * @return 结果
     */
    @Override
    public int insertTTeafollow(TTeafollow tTeafollow) {
        return tTeafollowMapper.insertTTeafollow(tTeafollow);
    }

    /**
     * 修改关注教师
     *
     * @param tTeafollow 关注教师信息
     * @return 结果
     */
    @Override
    public int updateTTeafollow(TTeafollow tTeafollow) {
        return tTeafollowMapper.updateTTeafollow(tTeafollow);
    }

    /**
     * 删除关注教师对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteTTeafollowByIds(String ids) {
        return tTeafollowMapper.deleteTTeafollowByIds(Convert.toStrArray(ids));
    }
}